<%@ include file="/WEB-INF/jsp/include.jsp" %>
<div id="recipes_list_div" class="recipes_list_in_select_form">
    <table style="height:100%" border="0" width="100%">
        <tr><td valign="top">
            <table>
                <c:forEach var="childGroup" items="${childGroups}">
                    <tr>
                        <td>
                            <span class="recipe_folder recipe_group_select_link">
                                <span class="hidden_id">${childGroup.id}</span>
                                <c:out value="${childGroup.name}"/>
                            </span>
                            <%--GROUP: <c:out value="${childGroup.name}"/>--%>
                        </td>
                    </tr>
                </c:forEach>
                <c:choose>
                    <c:when test="${not empty recipes}">
                        <c:forEach var="recipe" items="${recipes}">
                            <tr>
                                <td>
                            <span class="recipe_select_link">
                                <span class="hidden_id">${recipe.id}</span>
                                <span class="recipe_name"><c:out value="${recipe.name}"/></span>
                            </span>
                                </td>
                            </tr>
                        </c:forEach>
                    </c:when>
                    <c:otherwise>
                        <tr>
                            <td>no recipes in selected group[<c:out value="${group.name}"/>]</td>
                        </tr>
                    </c:otherwise>
                </c:choose>
            </table>
        </td></tr>
        <tr><td valign="bottom" align="center">
        <c:if test="${not empty pageNums}">
            <table>
                <tr>
                    <c:forEach var="pageNum" items="${pageNums}">
                        <td>
                            <c:choose>
                                <c:when test="${pageNum >= 0 && pageNum != selectedPage}">
                            <span class="page_select_link"><span class="hidden_id">${pageNum}</span><b><c:out
                                    value="${pageNum + 1}"/></b></span>
                                </c:when>
                                <c:when test="${pageNum >= 0 && pageNum == selectedPage}">
                                    <c:out value="${pageNum + 1}"/>
                                </c:when>
                                <c:otherwise>...</c:otherwise>
                            </c:choose>
                        </td>
                    </c:forEach>
                </tr>
            </table>
        </c:if>
        </td></tr>
    </table>
</div>